From: Richard M. Stallman Date: Sun, 11 Apr 1993 21:22:35 +0000 (+0000) Subject: (find-file-noselect): Verify other buffers' file numbers are still valid. X-Git-Tag: archive/raspbian/1%29.2+1-2+rpi1^2~5^2~96539 X-Git-Url: https://dgit.raspbian.org/%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:///%22http:/www.example.com/cgi/%22https:/www.github.com/%22bookmarks:/?a=commitdiff_plain;h=4e7afa864d1a35383219953d25b6fdc78f567324;p=emacs.git (find-file-noselect): Verify other buffers' file numbers are still valid. --- diff --git a/lisp/files.el b/lisp/files.el index fe3a29cfdd1..5d1b91ce823 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -480,7 +480,11 @@ The buffer is not selected, just returned to the caller." (while (and (not found) list) (save-excursion (set-buffer (car list)) - (if (equal buffer-file-number number) + (if (and (equal buffer-file-number number) + ;; Verify this buffer's file number + ;; still belongs to its file. + (file-exists-p buffer-file-name) + (equal (nthcdr 10 (file-attributes buffer-file-name)) number)) (setq found (car list)))) (setq list (cdr list))) found))))